<!-- People List -->
<g:if test="${company}">
  <g:set var="title" value="${title}&nbsp;for&nbsp;${company}" />
</g:if>
<head>
  <meta name="layout" content="app" />
  <gui:resources components="dataTable"/>
  <link rel="stylesheet" href="${resource(dir:'css/jquery-grid',file:'ui.jqgrid.css')}" />
  <g:javascript library="jquery-grid/i18n/grid.locale-en"/>
  <g:javascript library="jquery-grid/jquery.jqGrid.min"/>
  <g:javascript library="jqGridPersonList"/>
  <script type="text/javascript">
    // Setting variables from the params to be available in the js files.
    var companyId = "${company.id}";
    var type = "${type}";
  </script>
  <title>${title}</title>
</head>
<body>
  <div class="body">
    <h1>${title}</h1>
    <g:render template="/common/flashMessage" />
    <g:render template="addPerson" model="[id:company.id, type:type]" />

    <!-- table tag for the grid -->
    <div id="peopleListRep">
      <g:render template="/common/view/peopleList"/>
    </div>

    <tdcmw:linkButton action="show" params="[id:company.id, returnControllet:'company', returnAction:returnAction]" label="Return" />
<!--    <tdcmw:linkButton action="create" params="[id:company.id, returnAction:'editList']" label="Create" />-->
    <tdcmw:showDialogButton id="addDialog" model="[id:company.id]" label="Add Existing"/>
    <tdcmw:linkButton controller="company" action="edit" params="[id:company.id]" label="Edit Company" />
  </div>
</body>
